package cn.net.cfss.fgbp.provider.console.biz;

import java.util.List;
import org.springframework.stereotype.Service;
import cn.net.cfss.fgbp.api.console.dto.SysOrganDto;
import cn.net.cfss.fgbp.api.console.vo.SysOrganVo;
import cn.net.cfss.fgbp.base.common.biz.BaseBiz;
import cn.net.cfss.fgbp.provider.console.dao.SysOrganDtoMapper;

@Service
public class SysOrganDtoBiz extends BaseBiz<SysOrganDtoMapper, SysOrganDto> {

	public List<SysOrganVo> queryList(SysOrganVo sysDepartmentVo) {
        return mapper.queryList(sysDepartmentVo);
    }

	public List<SysOrganVo> pageOne(SysOrganVo sysDepartmentVo) {
		return mapper.pageOne(sysDepartmentVo);
	}

	public List<SysOrganVo> checkAddOrganName(String organName) {
		return mapper.checkAddOrganName(organName);
	}
	public List<SysOrganVo> checkUpdateOrganName(String organName,Long id) {
		return mapper.checkUpdateOrganName(organName,id);
	}
	public void updateParentIsLeafNode(Long id) {
		mapper.updateParentIsLeafNode(id);
	}

	public List<SysOrganVo> queryListOne() {
		return mapper.queryListOne();
	}
	
	public SysOrganVo getById(Long id) {
        return mapper.getById(id);
    }

	public void updateParentId(Long parentId ,String parentName) {
		 mapper.updateParentId(parentId,parentName);
	}
	
	public String maxLevel(Long parentId){
		return mapper.maxLevel(parentId);
	}

}
